Integrand size = 40, antiderivative size = 108 \[ \int \frac {\sec ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {(B-2 C) \text {arctanh}(\sin (c+d x))}{a^2 d}-\frac {(B-4 C) \tan (c+d x)}{3 a^2 d}-\frac {(B-2 C) \tan (c+d x)}{a^2 d (1+\sec (c+d x))}+\frac {(B-C) \sec ^2(c+d x) \tan (c+d x)}{3 d (a+a \sec (c+d x))^2} \]
(B-2*C)*arctanh(sin(d*x+c))/a^2/d-1/3*(B-4*C)*tan(d*x+c)/a^2/d-(B-2*C)*tan (d*x+c)/a^2/d/(1+sec(d*x+c))+1/3*(B-C)*sec(d*x+c)^2*tan(d*x+c)/d/(a+a*sec( d*x+c))^2
Time = 0.98 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.10 \[ \int \frac {\sec ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \sec ^2(c+d x) \left (6 (B-2 C) \text {arctanh}(\sin (c+d x)) \cos ^3\left (\frac {1}{2} (c+d x)\right )+(-2 B+8 C+(-5 B+14 C) \cos (c+d x)+(-2 B+5 C) \cos (2 (c+d x))) \sec (c+d x) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{3 a^2 d (1+\sec (c+d x))^2} \]
(2*Cos[(c + d*x)/2]*Sec[c + d*x]^2*(6*(B - 2*C)*ArcTanh[Sin[c + d*x]]*Cos[ (c + d*x)/2]^3 + (-2*B + 8*C + (-5*B + 14*C)*Cos[c + d*x] + (-2*B + 5*C)*C os[2*(c + d*x)])*Sec[c + d*x]*Sin[(c + d*x)/2]))/(3*a^2*d*(1 + Sec[c + d*x ])^2)
Time = 0.91 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.08, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.325, Rules used = {3042, 4560, 3042, 4507, 3042, 4496, 25, 3042, 4274, 3042, 4254, 24, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a \sec (c+d x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 4560 |
\(\displaystyle \int \frac {\sec ^3(c+d x) (B+C \sec (c+d x))}{(a \sec (c+d x)+a)^2}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (B+C \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a \csc \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\) |
\(\Big \downarrow \) 4507 |
\(\displaystyle \frac {\int \frac {\sec ^2(c+d x) (2 a (B-C)-a (B-4 C) \sec (c+d x))}{\sec (c+d x) a+a}dx}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (2 a (B-C)-a (B-4 C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\csc \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4496 |
\(\displaystyle \frac {-\frac {\int -\sec (c+d x) \left (3 a^2 (B-2 C)-a^2 (B-4 C) \sec (c+d x)\right )dx}{a^2}-\frac {3 (B-2 C) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \sec (c+d x) \left (3 a^2 (B-2 C)-a^2 (B-4 C) \sec (c+d x)\right )dx}{a^2}-\frac {3 (B-2 C) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \csc \left (c+d x+\frac {\pi }{2}\right ) \left (3 a^2 (B-2 C)-a^2 (B-4 C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}-\frac {3 (B-2 C) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle \frac {\frac {3 a^2 (B-2 C) \int \sec (c+d x)dx-a^2 (B-4 C) \int \sec ^2(c+d x)dx}{a^2}-\frac {3 (B-2 C) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 a^2 (B-2 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-a^2 (B-4 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{a^2}-\frac {3 (B-2 C) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {\frac {a^2 (B-4 C) \int 1d(-\tan (c+d x))}{d}+3 a^2 (B-2 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {3 (B-2 C) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {3 a^2 (B-2 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )dx-\frac {a^2 (B-4 C) \tan (c+d x)}{d}}{a^2}-\frac {3 (B-2 C) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle \frac {\frac {\frac {3 a^2 (B-2 C) \text {arctanh}(\sin (c+d x))}{d}-\frac {a^2 (B-4 C) \tan (c+d x)}{d}}{a^2}-\frac {3 (B-2 C) \tan (c+d x)}{d (\sec (c+d x)+1)}}{3 a^2}+\frac {(B-C) \tan (c+d x) \sec ^2(c+d x)}{3 d (a \sec (c+d x)+a)^2}\) |
((B - C)*Sec[c + d*x]^2*Tan[c + d*x])/(3*d*(a + a*Sec[c + d*x])^2) + ((-3* (B - 2*C)*Tan[c + d*x])/(d*(1 + Sec[c + d*x])) + ((3*a^2*(B - 2*C)*ArcTanh [Sin[c + d*x]])/d - (a^2*(B - 4*C)*Tan[c + d*x])/d)/a^2)/(3*a^2)
3.4.41.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[csc[(e_.) + (f_.)*(x_)]^2*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*( csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b - a*B))*Cot [e + f*x]*((a + b*Csc[e + f*x])^m/(b*f*(2*m + 1))), x] + Simp[1/(b^2*(2*m + 1)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*Simp[A*b*m - a*B*m + b *B*(2*m + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B}, x] && Ne Q[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[d*(A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^(n - 1)/(a*f*( 2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)* (d*Csc[e + f*x])^(n - 1)*Simp[A*(a*d*(n - 1)) - B*(b*d*(n - 1)) - d*(a*B*(m - n + 1) + A*b*(m + n))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] && G tQ[n, 0]
Int[((a_.) + csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_. )*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*((c_.) + csc[(e_.) + (f_.) *(x_)]*(d_.))^(n_.), x_Symbol] :> Simp[1/b^2 Int[(a + b*Csc[e + f*x])^(m + 1)*(c + d*Csc[e + f*x])^n*(b*B - a*C + b*C*Csc[e + f*x]), x], x] /; FreeQ [{a, b, c, d, e, f, A, B, C, m, n}, x] && EqQ[A*b^2 - a*b*B + a^2*C, 0]
Time = 0.22 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.17
method | result | size |
parallelrisch | \(\frac {-6 \cos \left (d x +c \right ) \left (B -2 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+6 \cos \left (d x +c \right ) \left (B -2 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-5 \sec \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} \left (\left (\frac {2 B}{5}-C \right ) \cos \left (2 d x +2 c \right )+\left (B -\frac {14 C}{5}\right ) \cos \left (d x +c \right )+\frac {2 B}{5}-\frac {8 C}{5}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{6 \cos \left (d x +c \right ) a^{2} d}\) | \(126\) |
derivativedivides | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\left (-2 B +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (-4 C +2 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{2 d \,a^{2}}\) | \(134\) |
default | \(\frac {-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} B}{3}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} C}{3}-3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\left (-2 B +4 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+\left (-4 C +2 B \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {2 C}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}}{2 d \,a^{2}}\) | \(134\) |
norman | \(\frac {\frac {\left (4 B -9 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{a d}+\frac {3 \left (B -3 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a d}-\frac {\left (B -2 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{a d}-\frac {\left (B -C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{6 a d}-\frac {\left (13 B -34 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 a d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3} a}+\frac {\left (B -2 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{a^{2} d}-\frac {\left (B -2 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2} d}\) | \(192\) |
risch | \(-\frac {2 i \left (3 B \,{\mathrm e}^{4 i \left (d x +c \right )}-6 C \,{\mathrm e}^{4 i \left (d x +c \right )}+9 B \,{\mathrm e}^{3 i \left (d x +c \right )}-18 C \,{\mathrm e}^{3 i \left (d x +c \right )}+7 B \,{\mathrm e}^{2 i \left (d x +c \right )}-22 C \,{\mathrm e}^{2 i \left (d x +c \right )}+9 B \,{\mathrm e}^{i \left (d x +c \right )}-24 C \,{\mathrm e}^{i \left (d x +c \right )}+4 B -10 C \right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{a^{2} d}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{a^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{a^{2} d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{a^{2} d}\) | \(227\) |
1/6*(-6*cos(d*x+c)*(B-2*C)*ln(tan(1/2*d*x+1/2*c)-1)+6*cos(d*x+c)*(B-2*C)*l n(tan(1/2*d*x+1/2*c)+1)-5*sec(1/2*d*x+1/2*c)^2*((2/5*B-C)*cos(2*d*x+2*c)+( B-14/5*C)*cos(d*x+c)+2/5*B-8/5*C)*tan(1/2*d*x+1/2*c))/cos(d*x+c)/a^2/d
Time = 0.26 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.81 \[ \int \frac {\sec ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {3 \, {\left ({\left (B - 2 \, C\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (B - 2 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (B - 2 \, C\right )} \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (B - 2 \, C\right )} \cos \left (d x + c\right )^{3} + 2 \, {\left (B - 2 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (B - 2 \, C\right )} \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (2 \, {\left (2 \, B - 5 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (5 \, B - 14 \, C\right )} \cos \left (d x + c\right ) - 3 \, C\right )} \sin \left (d x + c\right )}{6 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}} \]
integrate(sec(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^2,x, algorithm="fricas")
1/6*(3*((B - 2*C)*cos(d*x + c)^3 + 2*(B - 2*C)*cos(d*x + c)^2 + (B - 2*C)* cos(d*x + c))*log(sin(d*x + c) + 1) - 3*((B - 2*C)*cos(d*x + c)^3 + 2*(B - 2*C)*cos(d*x + c)^2 + (B - 2*C)*cos(d*x + c))*log(-sin(d*x + c) + 1) - 2* (2*(2*B - 5*C)*cos(d*x + c)^2 + (5*B - 14*C)*cos(d*x + c) - 3*C)*sin(d*x + c))/(a^2*d*cos(d*x + c)^3 + 2*a^2*d*cos(d*x + c)^2 + a^2*d*cos(d*x + c))
\[ \int \frac {\sec ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {\int \frac {B \sec ^{3}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \sec ^{4}{\left (c + d x \right )}}{\sec ^{2}{\left (c + d x \right )} + 2 \sec {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]
(Integral(B*sec(c + d*x)**3/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x) + I ntegral(C*sec(c + d*x)**4/(sec(c + d*x)**2 + 2*sec(c + d*x) + 1), x))/a**2
Leaf count of result is larger than twice the leaf count of optimal. 244 vs. \(2 (104) = 208\).
Time = 0.22 (sec) , antiderivative size = 244, normalized size of antiderivative = 2.26 \[ \int \frac {\sec ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {C {\left (\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} - \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - B {\left (\frac {\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {6 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {6 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}}\right )}}{6 \, d} \]
integrate(sec(d*x+c)^2*(B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c))^2,x, algorithm="maxima")
1/6*(C*((15*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 12*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 12*log(si n(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2 + 12*sin(d*x + c)/((a^2 - a^2*sin(d *x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1))) - B*((9*sin(d*x + c)/ (cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/a^2 - 6*log(sin( d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 6*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a^2))/d
Time = 0.30 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.40 \[ \int \frac {\sec ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {\frac {6 \, {\left (B - 2 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {6 \, {\left (B - 2 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} - \frac {12 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a^{2}} - \frac {B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 9 \, B a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 15 \, C a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]
1/6*(6*(B - 2*C)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 6*(B - 2*C)*log( abs(tan(1/2*d*x + 1/2*c) - 1))/a^2 - 12*C*tan(1/2*d*x + 1/2*c)/((tan(1/2*d *x + 1/2*c)^2 - 1)*a^2) - (B*a^4*tan(1/2*d*x + 1/2*c)^3 - C*a^4*tan(1/2*d* x + 1/2*c)^3 + 9*B*a^4*tan(1/2*d*x + 1/2*c) - 15*C*a^4*tan(1/2*d*x + 1/2*c ))/a^6)/d
Time = 16.00 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.11 \[ \int \frac {\sec ^2(c+d x) \left (B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx=\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (B-2\,C\right )}{a^2\,d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (B-C\right )}{6\,a^2\,d}-\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (\frac {B-C}{a^2}+\frac {B-3\,C}{2\,a^2}\right )}{d}-\frac {2\,C\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-a^2\right )} \]